import java.io.*;
import java.util.Map;
import java.util.Set;
import java.util.TreeMap;

public class test7 {
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new FileReader("Java_11_16\\csb.txt"));
        BufferedWriter bw = new BufferedWriter(new FileWriter("Java_11_16\\test6.txt"));
        TreeMap<Integer,String> map = new TreeMap<>();
        String line;
        while((line = br.readLine()) != null) {
            int index = Integer.parseInt(line.split("\\.")[0]);
            String str = line.split("\\.")[1];
            map.put(index,str);
        }
        Set<Map.Entry<Integer, String>> entry = map.entrySet();
        for( Map.Entry<Integer,String> en :entry) {
            bw.write(en.getValue());
            bw.newLine();
        }
        bw.close();
        br.close();
    }
}
